#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

void solve()
{
	int a,b,c,d,x,y;
	cin>>a>>b>>c>>d>>x>>y;
	int x1=abs(a-x),y1=abs(b-y);
	int x2=abs(c-x),y2=abs(d-y);
	int ans1=0,ans2=0;
	int i=0,j=0;
	while(x1>2||y1>2){
		if(x1>y1){
			x1-=2;
			if(y1<=0){
				y1++;
			}
			else{
				y1--;
			}
		}
		else{
			y1-=2;
			if(x1<=0){
				x1++;
			}
			else{
				x1--;
			}
		}
		ans1++;
	}
	x1=abs(x1),y1=abs(y1);
	if(x1+y1==4){
		ans1+=4;
	}
	else if(x1+y1==3){
		ans1+=1;
	}
	else if(x1+y1==2){
		ans1+=2;
	}
	else if(x1+y1==1){
		ans1+=3;
	}
	while(x2>2||y2>2){
		if(x2>y2){
			x2-=2;
			if(y2<0){
				y2++;
			}
			else{
				y2--;
			}
		}
		else{
			y2-=2;
			if(x2<0){
				x2++;
			}
			else{
				x2--;
			}
		}
		ans2++;
	}
	x2=abs(x2),y2=abs(y2);
	if(x2+y2==4){
		ans2+=4;
	}
	else if(x2+y2==3){
		ans2+=1;
	}
	else if(x2+y2==2){
		ans2+=2;
	}
	else if(x2+y2==1){
		ans2+=3;
	}
//	cout<<ans1<<" "<<ans2<<"\n";
	if(ans1<ans2){
		cout<<"zheng";
	}
	else if(ans1>ans2){
		cout<<"xie";
	}
	else{
		cout<<"gpnu acm";
	}
}

int main()
{
	std::ios::sync_with_stdio(false);
	std::cin.tie(0),cout.tie(0);
	int t=1;
//	cin>>t;
	while(t--)
		solve();
	return 0;
}
